package servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(value = "/updateClassInfo")
public class updateClassInfo extends HttpServlet{

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        req.setCharacterEncoding("UTF-8");
        int cno=Integer.parseInt(req.getParameter("cno").toString());

        String cname=req.getParameter("cname");
        String uname=req.getParameter("uname");

        if(cno!=0 && cname!="" && uname!=""){
            System.out.println(cno+"----"+cname+"----"+uname);
        }
        System.out.println(cno+"----"+cname+"----"+uname);


    }


    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req,resp);
    }
}
